import { Pipe, PipeTransform } from "@angular/core";

@Pipe({
    name: 'exclude'
})
export class ExcludePipe implements PipeTransform {
    transform(items: any[], exclude: string) {
        if (exclude) {
            let deepClone = items.slice();
            return deepClone.filter(x => x.id != exclude);
        }
        else
            return items;
    }
}